#include <cstdlib>
#include <iostream>
#include "LOLCode.h"
#include "MyException.h"
#include "FileLOLCode.h"
#include "FileCPP.h"
#include "color.h"

int main(int ac, char **av)
{
  if (ac != 3)
    {
      std::cerr << red << "./lolCode inPutFile outPutFile" << white << std::endl;
      return (EXIT_FAILURE);
    }
  std::string infile = av[1];
  std::string outfile = av[2];
  LOLCode	lol;
  try
    {
      lol.createAST(infile, false);
      lol.astToFile(outfile);
    }
  catch(std::exception *e) 
    {
      std::cerr << e->what() << std::endl;
      exit(EXIT_FAILURE);
    }
}
